<?php
echo '<?xml version="1.0" encoding="UTF-8" ?>';
echo $this->doctype();
?>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<?= $this->loadSkin($this->skin); ?>
    <?= $this->headTitle();?>
    <?= $this->headScript();?>
    <link type="text/css" rel="stylesheet" media="screen" href="/skins/blues/css/index.css">
</head>
<?php $url = new Zend_Controller_Action_Helper_Url();;?>
<body>
	<div id="wrapper">
		<table id="layout" cellspacing="0" cellpadding="0" border="0">
			<colgroup>
				<col class="colone" />
				<col class="coltwo" />
			</colgroup>
			<tbody>
				<tr>
					<td id="header" colspan="2">
						<div id="menu1">
							<table width="200px" style="float:right; margin-right:45px;">
								<tr><td width="20px" align="center"><img src="./skins/blues/images/dot01.gif" /></td>
									<td width="50px"><a href="http://www.beijing11.com/dede.php">校园官网</a></td>
									<td width="20px" align="center"><img src="./skins/blues/images/dot01.gif" /></td>
									<td width="50px"><a href="http://www.beijing11.com/num.php">学习在线</a></td>
								</tr>
							</table>
						</div>
						<div id="menu2">
							<table width="550px" style="float:right; margin:2px 50px 5px 0; clear:both;">
								<tr><td width="25px"><a href="http://www.beijing11.com/group/index.php">首页</a></td>
									<td width="14px" align="center"><img src="./skins/blues/images/dot02.gif" /></td>
									<td width="50px"><a href="http://www.beijing11.com/group/zhuti.php?id=9">主题专区</a></td>
									<td width="14px" align="center"><img src="./skins/blues/images/dot02.gif" /></td>
									<td width="60px"><a href="http://www.beijing11.com/group/blog.php">教育博客群</a></td>
									<td width="14px" align="center"><img src="./skins/blues/images/dot02.gif" /></td>
									<td width="45px"><a href="http://www.beijing11.com/group/class.php?classid=195">班级圈</a></td>
									<td width="14px" align="center"><img src="./skins/blues/images/dot02.gif" /></td>
									<td width="45px"><a href="http://www.beijing11.com/group/study.php?classid=194">学习圈</a></td>
									<td width="14px" align="center"><img src="./skins/blues/images/dot02.gif" /></td>
									<td width="45px"><a href="http://www.beijing11.com/group/group.php?gid=15">校友圈</a></td>
									<td width="14px" align="center"><img src="./skins/blues/images/dot02.gif" /></td>
									<td width="45px"><a href="http://www.beijing11.com/group/group.php?gid=14">家长圈</a></td>
									<td width="14px" align="center"><img src="./skins/blues/images/dot02.gif" /></td>
									<td width="50px">十一在线</td>
								</tr>
							</table>
						</div>
					</td>
				</tr>
				<tr>
					<td id="zhongyingxuexi" colspan="2" align="right" valign="top">
						<table width="550">
							<tr height="40">
								<td>我的圈子 | 圈子分类 | 帮助</td>
							</tr>
							<tr height="95"><td></td></tr>
							<tr>
								<td>
									<table width="100%" cellpadding="0" cellspacing="0" border="0" >
										<tr>
                                        	<td height="30" valign="bottom">
                                        		<img src="./skins/blues/images/dot04.gif" />
                                            </td>
                                            <td valign="middle">
                                        		<h4><a href="<?= $url->simple('index', 'announcement', null);?>">圈子活动</a>&nbsp;&nbsp;&nbsp;Announcement</h4>
                                            </td>
                                            <td><a href="<?= $url->simple('index', 'announcement', null);?>">&gt;&gt; more</a></td>
                                        </tr>
										<?php foreach($this->announcements as $announcement):?>
										<tr height="20px">
											<td width="35" align="center"><img src="./skins/blues/images/dot03.gif" /></td>
											<td width="400" align="left">
												<?php if ($announcement->top):?><font color="#FF0000">[置顶]</font><?php endif;?>
												<a href="<?=$this->url(array('announcementId' => $announcement->id),'announcement_content'); ?>">
						                        <?=$this->Escape($announcement->title); ?></a>
						                    </td>
											<td width="120">
												<? $date = new Zend_Date($announcement->publishdate, Zend_Date::TIMESTAMP); ?>
                                            	<?= $date->toString("Y-M-d");?>
                                           	</td>
										</tr>
										<?php endforeach;?>
									</table>						
								</td>
							</tr>
							<tr>
								<td>
									<table width="100%" cellpadding="0" cellspacing="0" border="0" >
										<tr>
                                        	<td height="30" valign="bottom">
                                        		<h4>其它圈子</h4>
                                            </td>
                                        </tr>
                                         <tr><td height=10></td></tr>
										<tr height="20px">
											<td width="60" align="left"><a href="http://www.beijing11.com/group/group.php?gid=19">体育圈</a></td>
											<td width="60" align="left"><a href="http://www.beijing11.com/group/group.php?gid=20">美术圈</a></td>
											<td width="60" align="left"><a href="http://www.beijing11.com/group/group.php?gid=18">文学圈</a></td>
											<td width="200" align="left">文化长廊</td>
										</tr>
										 <tr><td height=10></td></tr>
										<tr height="20px">
											<td width="60" align="right"><span style="color: green; font-weight: bold;">搜索 &gt;&gt;</span></td>
											<td align="left" colspan="3"><span style="float: left"><input type="text" size=30 />&nbsp;&nbsp;搜索文章</span></td>
										</tr>
									</table>						
								</td>
							</tr>
						</table>
					</td>
				</tr>
				<tr id="bodyrow">
					<td id="left" align="left" valign="top">
						<table id="user" cellpadding="0" cellspacing="0" border="0">
							<tr>
								<td width=90></td>
								<td align="left" valign="top" width=240 height=265 background="./skins/blues/images/login.gif">
									<?php if ($this->authInfo()->isLoggedIn()):?>
										<table cellpadding="0" cellspacing="0" border="0">
                                    	<tr height="90"><td></td></tr>
                                    	<tr><td valign="top" align="left">
                                    		<table cellpadding="0" cellspacing="0" border="0">
                                    		<tr height="40">
                                    			<td width="30"></td>
                                    			<td width="100">欢迎您：<?= $this->authInfo('username')?></td>
                                    		</tr></table>
                                    	</td></tr>
                                    	<tr><td valign="top" align="left">
                                    		<?php if($this->authInfo('role') == 'Teacher'): ?>
                                    		<table cellpadding="0" cellspacing="0" border="0">
                                    		<tr height="40">
                                    			<td width="30"></td>
                                    			<td width="100"><a href="<?= $url->simple('index', 'aqzintroduction', null);?>">后台管理</a></td>
                                    		</tr></table>
                                    		<?php endif;?>
                                    		<table cellpadding="0" cellspacing="0" border="0">
                                    		<tr height="40">
                                    			<td width="30"></td>
                                    			<td width="100"><a href="<?= $url->simple('logout', 'customer', null);?>">退出</a></td>
                                    		</tr></table>
                                    	</td></tr>
                                    	</table>
									<?php else:?>
									    <?= $this->userForm;?>
									<?php endif;?>
								</td>
							</tr>
						</table>
						<div style="background-image:url('./skins/blues/images/zhongyingxuexiquan.jpg'); background-repeat: no-repeat; width:239px; height:443px; margin-left: 90px;">
							<table width="90%" style="margin-top:40px; margin-left:13px;">
								<tr><td align="center"><img src="<?= $this->qzIntroduction()->filepath ?>" /></td></tr>
								<tr><td align="left"><?= nl2br($this->qzintroduction()->content) ?>
										<br><br>成 员 数：<?= $this->qzintroduction()->members ?>
										<br><br>访问总量：<?= $this->qzintroduction()->views ?>
										<br><br>创建日期：<?= $this->qzintroduction()->createdate ?>
										<br><br>圈子类型：<?= $this->qzintroduction()->type ?></td></tr>
							</table>
						</div>
					</td>
					<td id="right">
						<div id="introductionarea">
							<table width="100%" cellpadding="0" cellspacing="0" border="0">
								<tr>
									<td height="38" background="/skins/blues/images/index_introducton_title.gif" align="left">
										<div style="margin-left: 30px;float: left;">
										<a href="<?= $url->simple('index', 'introduction', null);?>">
										<span style="font-size: 13px; font-weight: bold">主题介绍 Introduction</span></a>										
										</div>
										
										<div style="margin-right: 15px; float: right">
											<a href="<?=$this->url(array('controller' => 'introduction')); ?>">&gt;&gt; more</a>
										</div>
									</td>
								</tr>
								<tr>
									<td>
										<table width="90%" style="margin:0 30px;">
											<tr>
												<td width="180" valign="middle" align="left"><img src="<?= $this->introduction->filepath?>"/></td>
												<td align="left" valign="top">
													<a href="<?=$this->url(array('controller' => 'introduction')); ?>">
												    <?= mb_substr(nl2br($this->introduction->content),0,601) ?>……
												    </a>
												</td>
											</tr>
										</table>
									</td>
								</tr>
							</table>
						</div>
						<div id="teacherstudentarea">
							<table width="100%">
								<tr>
									<td height="38" background="/skins/blues/images/index_introducton_title.gif" align="left">
										<div style="margin-left: 30px;float: left;">
											<a href="<?= $url->simple('index', 'teacher', null);?>">
											<span style="font-size: 13px; font-weight: bold">共同学习 Cooperative Learning</span></a>										
										</div>
										<div style="margin-right: 15px; float: right">
											<a href="<?=$this->url(array('controller' => 'teacher')); ?>">&gt;&gt; more</a>
										</div>
									</td>
								</tr>
								<tr>
									<td>
									<table width="100%" cellspacing="0" cellpadding="0" border="0" align="center">
									<tbody>
										<tr>
											<td><table cellspacing="0" cellpadding="0" border="0" align="left">
                                            	<tbody><tr>
                                                	<td align="center">
                                                		<div style="float:left;	height:27px;padding-top:5px;width:19px;"></div>
                                          				<div id="d1" onclick="showCustomer('studentlist' , this);" class="bbb"></div>
                                                  		<div id="d2" class="ccc" onclick="showCustomer('teacherlist' , this);"></div>
                                          			</td>
                                              	</tr></tbody>
                                            </table></td>
										</tr>
										<tr>
                                        <td align="left"><table width="590" cellspacing="0" cellpadding="0" border="0">
                                          <tbody>
                                          <tr>
                                            <td valign="top" height="187">
                                            <div id="moddel">
                                                <div class="clearfix" style="margin-left: 20px">
                                            	<table width="610" cellpadding="0" cellspacing="0">
                                            		<tr height="40">
                                            			<td width="35"></td>
                                            			<td width="379" align="left" valign="middle"><h4>标题</h4>Topics</td>
                                            			<td width="50" align="center" ><h4>点击</h4></td>
                                            			<td width="70" align="center" ><h4>更新日期</h4></td>
                                            		</tr>
                                            		<?php $i = 1;?>
                                                    <? foreach($this->currentContents as $content):  ?>
                                                    <?php if ($i>11) continue; ?>
                                            		<tr height="23">
                                            			<td width="35" align="center" <?php if ($i%2):?>bgcolor="#ecf2f8"<?php endif;?>>◇</td>
                                            			<td align="left" width="379" align="left" <?php if ($i%2):?>bgcolor="#ecf2f8"<?php endif;?>  >
                                                			<?php if ($content->top):?><font color="#FF0000">[置顶]</font><?php endif;?>
                                                			<a href="<?=$this->url(array('contentId' => $content->id), 'student_content'); ?>">
                                                			<?=$this->Escape($content->title); ?></a>
                                            			</td>
                                            			<td align="center" width="50" <?php if ($i%2):?>bgcolor="#ecf2f8"<?php endif;?>>
                                            				<?=$this->Escape($content->views); ?>
                                            			</td>
                                            			<td align="center" width="70" <?php if ($i%2):?>bgcolor="#ecf2f8"<?php endif;?>>
                                            				<? $date = new Zend_Date($content->updatetime, Zend_Date::TIMESTAMP); ?>
                                            				<?= $date->toString("Y-M-d");?>
                                            			</td>
                                            		</tr>
                                            		<?php $i++;?>
                                                    <? endforeach; ?>
                                            	</table>
                                            </div>
                                            </div></td>
                                          </tr>
                                        </tbody></table></td>
                                      </tr>
									</tbody>
									</table>
									</td>
								</tr>
							</table>
						</div>
						<div id="picturearea">
							<table width="100%">
								<tr>
									<td height="36px" style="background-image: url(./skins/blues/images/index_picture_title.gif)" align="left">
										<table width="90%" cellpadding="0" cellspacing="0" border="0" style="margin-left:60px">
											<tr>
												<td align="left" width="520">
													<a href="<?= $url->simple('index', 'picture', null);?>"><span style="font-size: 13px; font-weight: bold; display: inline">交流图片 Pictures</span></a>
												</td>
												<td align="left">
													<a href="<?=$this->url(array('controller' => 'picture')); ?>">&gt;&gt; more</a>
												</td>
											</tr>										
										</table>
									</td>
								</tr>
								<tr>
									<td align="center">
										<table width="90%">
											<tr>
											<?php foreach($this->indexPics as $pic):?>
												<td valign="top" align="center" width="135">
													<table width="100%">
														<tr>
															<td align="center">
																<img src="<?= "/".$pic->thumb ?>" />
															</td>
														</tr>
														<tr>
															<td align="center" width="135">
																<?= $pic->description;?>
															</td>
														</tr>
													</table>
												</td>
											<?php endforeach;?>
											</tr>
										</table>
			        				</td>
								</tr>
							</table>
						</div>
					</td>
				</tr>
				<tr>
					<td id="footer" colspan="2">
						<p>校方声明 |  网站地图 | 版权所有：北京市第十一中学</p>
						<p>邮编：100050　地址：北京市崇文区金鱼池西区1号  电话：010-67023669　www.beijing11.com</p>
						<p>技术支持：北京咏怀钟鼎文化发展有限公司</p>
					</td>
				</tr>
			</tbody>
		</table>
	</div>
<script type="text/javascript">
var xmlHttp
function GetXmlHttpObject(handler){ 
	var objXmlHttp=null;
	if (navigator.userAgent.indexOf("Opera")>=0){
		alert("This example doesn't work in Opera");
		return; 
	}
	if (navigator.userAgent.indexOf("MSIE")>=0){ 
		var strName="Msxml2.XMLHTTP";
		if (navigator.appVersion.indexOf("MSIE 5.5")>=0){
			strName="Microsoft.XMLHTTP";
		} 
		try{ 
			objXmlHttp=new ActiveXObject(strName);
			objXmlHttp.onreadystatechange=handler;
			return objXmlHttp;
		}catch(e){ 
			alert("Error. Scripting for ActiveX might be disabled");
			return;
		} 
	} 
	if (navigator.userAgent.indexOf("Mozilla")>=0){
		objXmlHttp=new XMLHttpRequest();
		objXmlHttp.onload=handler;
		objXmlHttp.onerror=handler; 
		return objXmlHttp;
	}
} 
</script>

<script type="text/JavaScript">
function showCustomer(str , obj){
	var d1 = document.getElementById("d1");
	var d2 = document.getElementById("d2");
	if(d1 == obj){
		d1.className = "bbb";
		d2.className = "ccc";
	}
	if(d2 == obj){
		d1.className = "aaa";
		d2.className = "ddd";
	}
	var url="/index/" + str;
		//alert(url)
	xmlHttp=GetXmlHttpObject(stateChanged)
	xmlHttp.open("GET", url , true);
	xmlHttp.send(null);
	
} 

function stateChanged(){ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){
		var result = xmlHttp.responseText;
		var classObj = document.getElementById("moddel");
		classObj.innerHTML = result;
	} 
}
</script>
	
</body>
</html>